home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / bin / ginsu / ooglwrap.c < prev    next >
C/C++ Source or Header  |  1992-11-17  |  551b  |  32 lines

  1. #include <stdio.h>
  2. #include "geomclass.h"
  3. #include "geom.h"
  4. #include "transform.h"
  5. #include "plutil.h"
  6. #include "ooglwrap.h"
  7.  
  8. void CCWrap(char *in, char *out)
  9. {
  10.  FILE *fin,*fout;
  11.  Geom *gin;
  12.  Geom *gout;
  13.  
  14.  if (!(fin=fopen(in,"r")))
  15.  {
  16.   fprintf(stderr,"Couldn\'nt open tmp file\n");
  17.   return;
  18.  }
  19.  if (!(fout=fopen(out,"w")))
  20.  {
  21.   fprintf(stderr,"Couldn\'nt open tmp file\n");
  22.   return;
  23.  }
  24.  gin = GeomFLoad(fin, NULL);
  25.  gout = AnyToPL(gin, TM_IDENTITY);
  26.  GeomFSave(gout, fout, NULL);
  27.  GeomDelete(gin);
  28.  GeomDelete(gout);
  29.  fclose(fout);
  30.  fclose(fin);
  31. }
  32.